<script setup>
  import { Greeter, Dog, Snake, Horse } from "@/tyscript/4_类";
  let greeter = new Greeter("leo");
  let dog = new Dog(10);
  // let sam = new Snake("Sammy the Python");
  // let tom = new Horse("Tommy the Palomino");
</script>

<template>
  <main>
    <p>greeter类调用greet方法输出: {{ greeter.greet() }}</p>
    <p>dog对象调用类中的方法：{{ dog.bark() }}<br>{{ dog.move(10) }}<br>{{ dog.bark() }}</p>
    <p>dog对象调用类中的方法：{{ dog.bark() }}<br>{{ dog.move(10) }}<br>{{ dog.bark() }}</p>

  </main>
</template>
